<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/7/1
  Time: 10:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html style="height: 100%">
<head>
    <meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
<div id="container" style="height: 100%"></div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>


<script type="text/javascript">
    var dom = document.getElementById("container");
    var myChart = echarts.init(dom);
    var app = {};
    var data = ['${requestScope.s[0]}','${requestScope.s[1]}','${requestScope.s[2]}','${requestScope.s[3]}','${requestScope.s[4]}'];
    var num = ['${requestScope.count[0]}','${requestScope.count[2]}','${requestScope.count[4]}','${requestScope.count[3]}','${requestScope.count[1]}',];
    console.log(data);
    // var ind = JSON.parse();


    var option;

    option = {
        xAxis: {
            type: 'category',
            data: data

    },
        yAxis: {
            type: 'value'
        },
        series: [{
            data: num,
            type: 'bar',
            showBackground: true,
            backgroundStyle: {
                color: 'rgba(180, 180, 180, 0.2)'
            }
        }]
    };

    if (option && typeof option === 'object') {
        myChart.setOption(option);
    }

</script>

<%--
<script type="text/javascript">
    var dom = document.getElementById("container");
    var myChart = echarts.init(dom);
    var app = {};

    var option;
    option = {
        xAxis: {
            type: 'category',
            data: ['教育培训','电子商务','对外贸易','酒店旅游','房地产']
        },
        yAxis: {
            type: 'value'
        },
        series: [{
            data: [3,2,1,0,1],
            type: 'bar',
            showBackground: true,
            backgroundStyle: {
                color: 'rgba(180, 180, 180, 0.2)'
            }
        }]
    };

    if (option && typeof option === 'object') {
        myChart.setOption(option);
    }

</script>
--%>
</body>
</html>
